<?php
$adId = $_REQUEST['adId'];
$title = $_REQUEST['title'];
$summary = $_REQUEST['summary'];
$details = $_REQUEST['details'];
$adUrl = $_REQUEST['adUrl'];
$status = $_REQUEST['status'];
$category = $_REQUEST['category'];
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="../js/admanager.js"></script>
</head>
<body>

	<table border='2' rules='rows' cellpadding='8%' align='center'
		width='80%'>
		<tr>
			<th colspan="2"><h2>修改广告</h2></th>
		</tr>
		<tr>
			<th>广告ID</th>
			<td><?php echo $adId?></td>
		</tr>
		<tr>
			<th>标题</th>
			<td><input id="title" type="text" size="100"
				value="<?php echo $title?>"></input></td>
		</tr>
		<tr>
			<th>简介</th>
			<td><input id="summary" type="text" size="140"
				value="<?php echo $summary?>"></input></td>
		</tr>
		<tr>
			<th>详情</th>
			<td><textarea id="details" rows="6" cols="80"><?php echo str_replace("\t", "", $details);?></textarea></td>
		</tr>

		<tr>
			<th>广告链接</th>
			<td><input id="adUrl" type="text" size="140"
				value="<?php echo $adUrl?>"></input></td>
		</tr>
		
		<tr>
			<th>广告分类</th>
			<td><input id="category" type="text" size="140"
				value="<?php echo $category?>"></input></td>
		</tr>
		
		<tr>
			<th>是否开启</th>
			<td><select id="status"><option value="0">关闭</option>
					<option <?php if ($status == 1) echo "selected='selected'"?>
						value="1">开启</option>
			</select></td>
		</tr>
		<tr align="center">
			<td colspan="2"><input type="button" value="修改广告"
				onclick="updateAdvertising(<?php echo $adId?>);"></input></td>
		</tr>
	</table>

</body>
</html>
